arrow: Remove unneeded checks
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Apr 2014 06:36:48 +0000 (08:36 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 1 May 2014 12:51:27 +0000 (14:51 +0200)
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.

gtk/gtkarrow.c

index e3976441574a70027f726c0d311815c8c6e8487e..76f23a61b208cf7175996ed4eec6cffa47130d63 100644 (file)
@@ -201,11 +201,8 @@ gtk_arrow_get_preferred_width (GtkWidget *widget,
 
   _gtk_misc_get_padding_and_border (GTK_MISC (widget), &border);
 
-  if (minimum_size)
-    *minimum_size = MIN_ARROW_SIZE + border.left + border.right;
-
-  if (natural_size)
-    *natural_size = MIN_ARROW_SIZE + border.left + border.right;
+  *minimum_size = MIN_ARROW_SIZE + border.left + border.right;
+  *natural_size = MIN_ARROW_SIZE + border.left + border.right;
 }
 
 static void
@@ -217,11 +214,8 @@ gtk_arrow_get_preferred_height (GtkWidget *widget,
 
   _gtk_misc_get_padding_and_border (GTK_MISC (widget), &border);
 
-  if (minimum_size)
-    *minimum_size = MIN_ARROW_SIZE + border.top + border.bottom;
-
-  if (natural_size)
-    *natural_size = MIN_ARROW_SIZE + border.top + border.bottom;
+  *minimum_size = MIN_ARROW_SIZE + border.top + border.bottom;
+  *natural_size = MIN_ARROW_SIZE + border.top + border.bottom;
 }
 
 /**